﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>HelloWorld: build.xml Source File</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderJava
            </h1>
            <h3>
                HelloWorld: build.xml Source File
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">build.xml</div>  </div>
</div>
<div class="contents">
<a href="build_8xml.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
<a name="l00002"></a>00002 &lt;project name=<span class="stringliteral">&quot;HelloWorld&quot;</span> <span class="keywordflow">default</span>=<span class="stringliteral">&quot;package&quot;</span> basedir=<span class="stringliteral">&quot;.&quot;</span>&gt;
<a name="l00003"></a>00003     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;build.srcDir&quot;</span> value=<span class="stringliteral">&quot;${basedir}/src/main/java&quot;</span>/&gt;
<a name="l00004"></a>00004     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;build.target&quot;</span> value=<span class="stringliteral">&quot;${basedir}/target&quot;</span>/&gt;
<a name="l00005"></a>00005     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;build.outputDir&quot;</span> value=<span class="stringliteral">&quot;${build.target}/classes&quot;</span>/&gt;
<a name="l00006"></a>00006     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;build.finalName&quot;</span> value=<span class="stringliteral">&quot;HelloWorld-1.0.0&quot;</span>/&gt;
<a name="l00007"></a>00007 
<a name="l00008"></a>00008     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;statebuilder.dir&quot;</span> value=<span class="stringliteral">&quot;${user.home}/AppData/Local/StateForge/StateBuilderJava&quot;</span>/&gt;
<a name="l00009"></a>00009     &lt;!-- TODO: <span class="keywordflow">for</span> linux and mac, adjust the following path: --&gt;
<a name="l00010"></a>00010     &lt;!--&lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;statebuilder.dir&quot;</span> value=<span class="stringliteral">&quot;${user.home}/StateBuilderJava&quot;</span>/&gt;--&gt;
<a name="l00011"></a>00011     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;statebuilder-ant-task.jar&quot;</span> value=<span class="stringliteral">&quot;${statebuilder.dir}/lib/statebuilder-ant-task-1.1.jar&quot;</span>/&gt;
<a name="l00012"></a>00012     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;statemachine.jar&quot;</span> value=<span class="stringliteral">&quot;${statebuilder.dir}/lib/statemachine-1.1.jar&quot;</span>/&gt;
<a name="l00013"></a>00013     
<a name="l00014"></a>00014     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;statemachine.input.dir&quot;</span> value=<span class="stringliteral">&quot;${basedir}/src/main/statemachine&quot;</span>/&gt;
<a name="l00015"></a>00015     &lt;<span class="keyword">property</span> name=<span class="stringliteral">&quot;statemachine.output.dir&quot;</span> value=<span class="stringliteral">&quot;${build.target}/generated-sources/statebuilder&quot;</span>/&gt;
<a name="l00016"></a>00016    
<a name="l00017"></a>00017     &lt;path <span class="keywordtype">id</span>=<span class="stringliteral">&quot;build.classpath&quot;</span>&gt;
<a name="l00018"></a>00018         &lt;pathelement location=<span class="stringliteral">&quot;${statemachine.jar}&quot;</span>/&gt;
<a name="l00019"></a>00019     &lt;/path&gt;
<a name="l00020"></a>00020     
<a name="l00021"></a>00021     &lt;!-- ====================================================================== --&gt;
<a name="l00022"></a>00022     &lt;!-- StateBuilder target                                                    --&gt;
<a name="l00023"></a>00023     &lt;!-- ====================================================================== --&gt;
<a name="l00024"></a>00024     &lt;target name=<span class="stringliteral">&quot;StateBuilder&quot;</span> description=<span class="stringliteral">&quot;Generate the state machine Java source code from Xml description&quot;</span>&gt;
<a name="l00025"></a>00025         &lt;mkdir dir=<span class="stringliteral">&quot;${build.target}&quot;</span>/&gt;
<a name="l00026"></a>00026         &lt;taskdef name=<span class="stringliteral">&quot;StateBuilder&quot;</span>
<a name="l00027"></a>00027                      classpath=<span class="stringliteral">&quot;${statebuilder-ant-task.jar}&quot;</span>
<a name="l00028"></a>00028                                  classname=<span class="stringliteral">&quot;com.stateforge.statebuilder.ant.StateBuilderAntTask&quot;</span>/&gt;
<a name="l00029"></a>00029 
<a name="l00030"></a>00030         &lt;StateBuilder input=<span class="stringliteral">&quot;${statemachine.input.dir}&quot;</span>
<a name="l00031"></a>00031                       output=<span class="stringliteral">&quot;${statemachine.output.dir}&quot;</span>/&gt;
<a name="l00032"></a>00032     &lt;/target&gt;
<a name="l00033"></a>00033     
<a name="l00034"></a>00034     &lt;!-- ====================================================================== --&gt;
<a name="l00035"></a>00035     &lt;!-- Compile target                                                         --&gt;
<a name="l00036"></a>00036     &lt;!-- ====================================================================== --&gt;
<a name="l00037"></a>00037     &lt;target name=<span class="stringliteral">&quot;compile&quot;</span> depends=<span class="stringliteral">&quot;StateBuilder&quot;</span> description=<span class="stringliteral">&quot;Compiles the java source code&quot;</span>&gt;
<a name="l00038"></a>00038         &lt;mkdir dir=<span class="stringliteral">&quot;${build.outputDir}&quot;</span>/&gt;
<a name="l00039"></a>00039 
<a name="l00040"></a>00040         &lt;javac destdir=<span class="stringliteral">&quot;${build.outputDir}&quot;</span>&gt;
<a name="l00041"></a>00041             &lt;src path=<span class="stringliteral">&quot;${build.srcDir}&quot;</span>/&gt;
<a name="l00042"></a>00042             &lt;src path=<span class="stringliteral">&quot;${statemachine.output.dir}&quot;</span>/&gt;
<a name="l00043"></a>00043             &lt;classpath refid=<span class="stringliteral">&quot;build.classpath&quot;</span>/&gt;
<a name="l00044"></a>00044         &lt;/javac&gt;
<a name="l00045"></a>00045     &lt;/target&gt;
<a name="l00046"></a>00046 
<a name="l00047"></a>00047     &lt;!-- ====================================================================== --&gt;
<a name="l00048"></a>00048     &lt;!-- Package target                                                         --&gt;
<a name="l00049"></a>00049     &lt;!-- ====================================================================== --&gt;
<a name="l00050"></a>00050     &lt;target name=<span class="stringliteral">&quot;package&quot;</span> depends=<span class="stringliteral">&quot;compile&quot;</span> description=<span class="stringliteral">&quot;Package the application&quot;</span>&gt;
<a name="l00051"></a>00051         &lt;jar jarfile=<span class="stringliteral">&quot;${build.target}/${build.finalName}.jar&quot;</span>
<a name="l00052"></a>00052              compress=<span class="stringliteral">&quot;true&quot;</span>
<a name="l00053"></a>00053              index=<span class="stringliteral">&quot;false&quot;</span>
<a name="l00054"></a>00054              basedir=<span class="stringliteral">&quot;${build.outputDir}&quot;</span>
<a name="l00055"></a>00055              excludes=<span class="stringliteral">&quot;**/package.html&quot;</span>/&gt;
<a name="l00056"></a>00056     &lt;/target&gt;
<a name="l00057"></a>00057     
<a name="l00058"></a>00058     &lt;!-- ====================================================================== --&gt;
<a name="l00059"></a>00059     &lt;!-- Cleaning up target                                                     --&gt;
<a name="l00060"></a>00060     &lt;!-- ====================================================================== --&gt;
<a name="l00061"></a>00061     &lt;target name=<span class="stringliteral">&quot;clean&quot;</span> description=<span class="stringliteral">&quot;Clean the output directory&quot;</span>&gt;
<a name="l00062"></a>00062         &lt;<span class="keyword">delete</span> dir=<span class="stringliteral">&quot;${build.target}&quot;</span>/&gt;
<a name="l00063"></a>00063     &lt;/target&gt;    
<a name="l00064"></a>00064 &lt;/project&gt;
</pre></div></div>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
